package com.vates.curso.dao;

import java.io.Serializable;
import java.util.List;

public interface GenericDao<T, PK extends Serializable> {

	/**
	 * Save.
	 * 
	 * @param entity
	 *            the entity
	 */
	void save(T entity);

	/**
	 * Delete.
	 * 
	 * @param entity
	 *            the entity
	 */
	void delete(T entity);

	/**
	 * Update.
	 * 
	 * @param entity
	 *            the entity
	 */
	void update(T entity);

	/**
	 * Gets the.
	 * 
	 * @param id
	 *            the id
	 * @return the t
	 */
	T get(PK id);

	/**
	 * Gets the all.
	 * 
	 * @return the all
	 */
	List<T> getAll();

	/**
	 * Gets the related entity class.
	 * 
	 * @return the related entity class
	 */
	Class<T> getRelatedEntityClass();

	/**
	 * Execute sql query.
	 * 
	 * @param sqlQuery
	 *            the sql query
	 * @return the list
	 */
	List<T> executeSQLQuery(String sqlQuery);
}
